<?php        
    class WorkoutExerciseModel extends Model {        
        public static $classDesc = "Workout exercise";
        
        public static $keyDesc = array(
            "id"                => "ID",
            "workoutid"         => "Workout ID",            
            "unit"              => "Unit",
            "extratext"         => "Name/desc",
            "special"           => "Special",
            "gear_belt"         => "Belt",
            "gear_knee_wraps"   => "Knee wraps",
            "gear_shirt"        => "Shirt",
            "gear_suit"         => "Suit",
            "gear_wrist_straps" => "Wrist straps",
            "gear_wrist_wraps"  => "Wrist wraps"
        );
        
        public function __construct($id = null) {                                    
            $this->_childClass["workout_exercise_set"] = "WorkoutExerciseSetModel";
            
            $this->_childs["workout_exercise_set"] = null;
            
            $this->_foreignIdCol    = "workout_exerciseid";
            $this->_table           = "workout_exercise";
            
            parent::__construct($id);
            
            # Varusteiden maksimit
            parent::$_schema["workout_exercise"]["gear_belt"]["max"]            = 1;
            parent::$_schema["workout_exercise"]["gear_knee_wraps"]["max"]      = 1;
            parent::$_schema["workout_exercise"]["gear_shirt"]["max"]           = 1;
            parent::$_schema["workout_exercise"]["gear_suit"]["max"]            = 1;
            parent::$_schema["workout_exercise"]["gear_wrist_straps"]["max"]    = 1;
            parent::$_schema["workout_exercise"]["gear_wrist_wraps"]["max"]     = 1;
        }
    }